package com.lbm.baseclass.dao;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.lbm.baseclass.model.BaseEntity;

public interface IBaseDAO {
	public void saveOrUpdateVO(BaseEntity vo) throws DataAccessException;
	@SuppressWarnings("rawtypes")
	public void saveOrUpdateBatchVO(List dataList) throws DataAccessException;
	public void deleteVO(BaseEntity vo, String id) throws DataAccessException;
	public void deleteVO(BaseEntity vo) throws DataAccessException;
	@SuppressWarnings("rawtypes")
	public void deleteBatchVO(List dataList) throws DataAccessException;
	@SuppressWarnings("rawtypes")
	public List getPageDataByHQL(String hql, int page_size, int pageNo, Object... object)
			throws DataAccessException;
	@SuppressWarnings("rawtypes")
	public List getValueObjectsByHQL(final String hql) throws DataAccessException;
	public BaseEntity getVO(BaseEntity vo, String id) throws DataAccessException;
	public int getDataTotalNum(String hql, Object... args)
			throws DataAccessException;
	public int getTotalNumBySQL(String sql, Object... args) throws DataAccessException;
	public <T> T doInHibernate(HibernateCallback<T> callback);
	public List<Map<String, Object>> queryForPagedListBySQL(String sql, int page, int rows, Object... args) throws DataAccessException;
	List<Map<String, Object>> queryForListBySQL(String sql)
			throws DataAccessException;
}
